import { Router } from "jsr:@oak/oak/router";
import { authMiddleware } from "../middleware/authMiddleware.ts";
import { adminOnly } from "../middleware/adminOnly.ts";
import type { ApiResponse, AdminDashboardData } from "../shared/types.ts";

const router = new Router();

router.get("/api/admin/dashboard", authMiddleware, adminOnly, (ctx) => {
  const response: ApiResponse<AdminDashboardData> = {
    success: true,
    data: {
      stats: {
        users: 100,
        posts: 200,
        comments: 300
      }
    }
  };
  
  ctx.response.body = response;
});

export default router; 